package basis.invoke;

import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;

public class InvocationTest {
    public static void main(String[] args) throws ClassNotFoundException, NoSuchMethodException, IllegalAccessException, InstantiationException, InvocationTargetException, NoSuchFieldException{
        Class<?> tagetClass = Class.forName("");
        Method[] methods = tagetClass.getDeclaredMethods();
        for (Method method : methods) {
            System.out.println(method.getName());
        }
        Object o = tagetClass.newInstance();
        Method methodName = tagetClass.getDeclaredMethod("methodName", String.class);
        Object args1 = methodName.invoke(o, "args");

    }
}
